package com.xitest.designpattern.decorate_observer.guava.demo;

import com.google.common.eventbus.EventBus;

/**
 * 咕泡社区事件总线
 */
public class EventBusCenter {

    private static EventBus eventBus = new EventBus();

    public EventBusCenter() {
    }

    public static EventBus getInstance(){
        return eventBus;
    }

    public static void register(Object obj){
        eventBus.register(obj);
    }

    public static void unregister(Object obj){
        eventBus.unregister(obj);
    }

    public static void post(Object event){
        eventBus.post(event);
    }
}
